﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

using Com.Web.coffinegurunaru.AppLogic.Page;
using Com.Library.DB.Menu;
using Com.Library.Page;
using Com.Framework.Data;

namespace Com.Web.coffinegurunaru.manager.menu
{
	public partial class recommendMethod : ManagerAjaxPage
	{
		public void Create(byte CategoryNo, string ImageURL, string Link, byte LinkType, string Desc)
		{
			RecommendMenuModel.Create(CategoryNo, ImageURL, Link, LinkType, Desc, this.WebCookies.ManagerName);
		}

		public void Modify(int SeqNo, string ImageURL, string Link, byte LinkType, string Desc)
		{
			RecommendMenuModel.Modify(SeqNo, ImageURL, Link, LinkType, Desc, this.WebCookies.ManagerName);
		}

		public void Remove(int SeqNo)
		{
			RecommendMenuModel.Remove(SeqNo);
		}

		public string GetList(byte CategoryNo, int PageNo, byte PageSize)
		{
			List<RecommendMenuEntity> list = RecommendMenuModel.GetList(CategoryNo, PageNo, PageSize);

			Dictionary<string, object> properties = new Dictionary<string, object>();
			properties.Add("RecommendList", list);
			string retValue = ViewManager<ManagerPage>.Render("/manager/menu/recommendlist.ascx", properties);

			return retValue;
		}
	}
}
